Excel BI - Excel Challenge 763

excel-challenges
excel-formulas
🔰 A B C D E F G H I J
Published

March 24, 2026

Illustration for Excel BI - Excel Challenge 763

Challenge Description

🔰 A B C D E F G H I J

Solutions

library(tidyverse)
  library(readxl)
  
  path = "Excel/700-799/763/763 Alphabets Staircase3.xlsx"
  test  = read_excel(path, range = "A2:AA27", col_names = FALSE) %>% as.matrix()
  input_matrix = matrix(NA_character_, nrow = 26, ncol = 27)
  
  for (i in 1:26) {
    input_matrix[i, i:(i + 1)] = LETTERS[i]
    if (i %% 2 == 0) input_matrix[i - 1, i + 1] = LETTERS[i]
  }
  
  all(input_matrix == test, na.rm = TRUE)
  # > [1] TRUE
  • Logic: Read the workbook ranges needed for the challenge; Iterate through the sequence until the rule is satisfied.
  • Strengths: The algorithm is explicit about the sequence rule, so the control flow is easy to validate against the prompt.
  • Areas for Improvement: The solution assumes the workbook layout and selected ranges remain stable, so any structural change in the sheet would require small adjustments.
  • Gem: The non-obvious part is the local rule inside the loop, because that rule determines the whole output.
import numpy as np
import pandas as pd
import string

path = "700-799/763/763 Alphabets Staircase3.xlsx"
test = pd.read_excel(path, sheet_name=0, usecols="A:AA", skiprows=1, nrows=26, header=None).to_numpy()
input_matrix = np.full((26, 27), np.nan, dtype=object)

letters = list(string.ascii_uppercase)

for i in range(1, 27):
    idx = i - 1
    input_matrix[idx, idx] = letters[idx]
    input_matrix[idx, idx + 1] = letters[idx]
    if i % 2 == 0:
        input_matrix[idx - 1, idx + 1] = letters[idx]
        input_matrix[idx, idx] = np.nan

print(pd.DataFrame(input_matrix).equals(pd.DataFrame(test)))

The Python version keeps the algorithm explicit, which helps when the challenge depends on a greedy or iterative rule.

Difficulty Level

Easy / Medium

The business rule is clear, though the workbook still needs a few transformation steps to reach the expected output.